package org.jsbd.boss.dao.impl;

import java.util.List;

import org.jsbd.boss.dao.ISimulatorLogDAO;
import org.jsbd.boss.domian.channel.ApkTaskInfo;
import org.jsbd.boss.domian.channel.ReserveUserVo;
import org.jsbd.boss.domian.channel.SimulatorLog;
import org.jsbd.boss.util.DateUtil;
import org.springframework.stereotype.Service;

import edu.hziee.common.queue.IBatchExecutor;

@Service("simulatorLogDao")
public class SimulatorLogDAOImpl extends CrackLogBaseDao implements IBatchExecutor<SimulatorLog>, ISimulatorLogDAO {

	@Override
	public void execute(List<SimulatorLog> records) {
		super.batchInsert("qy_simulator_log.INSERT_SIMULATOR_LOG", records);
	}

	@Override
	public List<ApkTaskInfo> selectExecTask(SimulatorLog log) {
		return super.queryForList("qy_simulator_log.SELECT_EXECTOTAL_LOG", log);
	}

	
	@Override
	public SimulatorLog selectSimulatorLog(SimulatorLog log){
		return (SimulatorLog) super.queryForObject("qy_simulator_log.SELECT_SIMULATOR_LOG", log);
	}
	
	
	@Override
	public List<ReserveUserVo> selectReserveUserList(String mark){
		SimulatorLog queryLog = new SimulatorLog();
		queryLog.setMark(mark);
		queryLog.setCurrentDate(DateUtil.getPreSomeDay(2));
		return super.queryForList("qy_simulator_log.SELECT_RESERVE_ADD_LIST", queryLog);
	}
}
